/**
 * @项目：DemoA
 * @创建人：ifuner
 * @创建人邮箱：zhoupengfei@kaiheikeji.com
 * @创建时间：2020-04-01 19:39:24
 * */

import store from "../../store";
import create from "../../utils/create";
// const app = getApp()
create(store, {
  data: {
    demoData: {},
    pageData:{
        num:0
    }
  },

  onLoad: function(target) {
    this.update()
  },
  onShow() {},
  onLogin(target) {
    // 在这个事件里面调用初始化业务
  },
  showLogin() {
    this.selectComponent("#login").showLoginNow();
  },
  addNum() {
      let num = this.data.demoData.num
      num++
    this.update({
      "demoData.num": num
    });
  },
    pageAddNum() {
        let num = this.data.pageData.num
        num++
        this.setData({
            "pageData.num": num
        });
    },
  toDemoB(){
    this.$router.navigateTo("DEMO_B_PAGE")
  }
});
